
<%@ page import="properties.PET" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <title>iPET - PET</title>
    </head>
    <body>
    	<g:render template="/common/menuPET" />
        <div id="text">
        <div class="body">
            <h2>Editar dados</h2>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${PETInstance}">
            <div class="errors">
                <g:renderErrors bean="${PETInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form method="post" >
                <g:hiddenField name="id" value="${PETInstance?.id}" />
                <g:hiddenField name="version" value="${PETInstance?.version}" />
                <div class="dialog">
                    <table>
                        <tbody>
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="institute"><g:message code="PET.institute.label" default="Instituto" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: PETInstance, field: 'institute', 'errors')}">
                                    <g:textField name="institute" maxlength="128" value="${PETInstance?.institute}" />
                                </td>
                            </tr>
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="acronym"><g:message code="PET.acronym.label" default="Sigla" /></label>
                                </td>
                                <td valign="top" class="min value ${hasErrors(bean: PETInstance, field: 'acronym', 'errors')}">
                                    <g:textField name="acronym" maxlength="10" value="${PETInstance?.acronym}" />
                                </td>
                            </tr>
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="course"><g:message code="PET.course.label" default="Curso" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: PETInstance, field: 'course', 'errors')}">
                                    <g:textField name="course" maxlength="128" value="${PETInstance?.course}" />
                                </td>
                            </tr>
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="cre"><g:message code="PET.cre.label" default="CRE mínimo" /></label>
                                </td>
                                <td valign="top" class="min value ${hasErrors(bean: PETInstance, field: 'cre', 'errors')}">
                                    <g:textField name="cre" maxlength="4" value="${fieldValue(bean: PETInstance, field: 'cre')}" />
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:actionSubmit class="save" action="update" value="Salvar" /></span>
                </div>
            </g:form>
        </div>
        </div>
    </body>
</html>
